package com.bjc.oss;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;

/**
 * @program: guli_parent
 * @description: 启动类
 * @author: bjc
 * @create: 2020-09-26 16:23
 */
@EnableDiscoveryClient
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@ComponentScan(basePackages = {"com.bjc"})
public class OssApplication {

    /**
     * 启动如果报错：Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
     * 两种解决方式：1.添加上数据库配置 2.在启动类添加属性，默认不去加载数据库配置 exclude = DataSourceAutoConfiguration.class
     * @param args
     */
    public static void main(String[] args) {
        SpringApplication.run(OssApplication.class,args);
    }
}
